﻿#ifndef TL_STATUS_H
#define TL_STATUS_H

namespace TL {
    /* TL::Status */

    class Status {
    public:
        int m_Code;
        bool m_Error;

    public:
        Status();

    public:
        void SetNull();
        void SetError(int errorCode = 1);
        void SetSuccess();
    };

    Status::Status()
    {
        m_Code = -1;
        m_Error = false;
    }

    void Status::SetError(int errorCode)
    {
        m_Code = errorCode;
        m_Error = true;
    }

    void Status::SetNull()
    {
        m_Code = -1;
        m_Error = false;
    }

    void Status::SetSuccess()
    {
        m_Code = 0;
        m_Error = false;
    }
}

#endif